UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EmGNpPVA/XU6p61VCElQlySM93eQ/eWlQmPfxsmgZWM='
WHERE
key_id = '3ebd9336a115c2930fe831a0ab0aa27ce0866918153345f8266bbae77f9d58b6'
AND (
token = 'EmGNpPVA/XU6p61VCElQlySM93eQ/eWlQmPfxsmgZWM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)