UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'NZogIWekp+eBmGZuGEBBLmrVxBufhE/ZbDCtGSI59lE='
WHERE
key_id = 'a410fab114e46c331e7ecccc020c706e2ebd89b2fd787789661e52deae2754f0'
AND (
token = 'NZogIWekp+eBmGZuGEBBLmrVxBufhE/ZbDCtGSI59lE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)