UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zIL3nlt2a9+ZY5VpDOS+poA4AhhiztU+FynBxaXToB8='
WHERE
key_id = 'fab833bf05f180b5f9deb7f91d00a7fb71c3aefbc81e87e7c4e3048e77c442d6'
AND (
token = 'zIL3nlt2a9+ZY5VpDOS+poA4AhhiztU+FynBxaXToB8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)