UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rlokLyfeycQt+XUugvgRtdmN7yyM0BxYvdP++t9L7oo='
WHERE
key_id = 'd07a75e608ed910eb2a02e9966bfb36536d2b0c6ddf473efe10c8796d9f3f064'
AND (
token = 'rlokLyfeycQt+XUugvgRtdmN7yyM0BxYvdP++t9L7oo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)