UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'pZMck0mRlMcOWDqNmwWFbrveQnle6yae5XIkBjSqo/w='
WHERE
key_id = 'b286d1d0f3247b0fa0797dbcab412c82d1cd5d450b35dbb7a2ca03bd4c000804'
AND (
token = 'pZMck0mRlMcOWDqNmwWFbrveQnle6yae5XIkBjSqo/w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)