UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bjb86OnIkuBFAMA5c7vRUG/ONitqJ4BYLjlXeLVXwnE='
WHERE
key_id = '73818a07f186741bc8f873fc251a2eff3fae1e7c746f79eed34725d9970e2028'
AND (
token = 'bjb86OnIkuBFAMA5c7vRUG/ONitqJ4BYLjlXeLVXwnE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)