UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0FN/ow8niq+GrrCXY+QRAolb/d8Irm9Lu2ySABJso+E='
WHERE
key_id = '1cddf64ba63f3c137c92a6e7c7a0123ce3a4c3e323f1562113815e8d46e707b3'
AND (
token = '0FN/ow8niq+GrrCXY+QRAolb/d8Irm9Lu2ySABJso+E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)