UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'tLNYeHIMUq1Q8tQoSuZPxOeJc/uTjkRJLme04wwRQnc='
WHERE
key_id = 'aa212499017872aaa01d5d19da720478b4b9bedff2b2041675237eebefef2e6c'
AND (
token = 'tLNYeHIMUq1Q8tQoSuZPxOeJc/uTjkRJLme04wwRQnc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)