UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SPnG3OhEaTUWeFKKa3blV0TBdC81xbfgHxS7RJPL//0='
WHERE
key_id = '2de98eb2a531ce26f78b2273f1ed63e0a3d0306b8bae0b6fadf2cac07f5651aa'
AND (
token = 'SPnG3OhEaTUWeFKKa3blV0TBdC81xbfgHxS7RJPL//0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)