UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oOObGwPGogrkgrG/zmLi2CbWxsSharNjysEelBmXbnw='
WHERE
key_id = '6e45fa30ae020742393e032c891994699384ce63314711ee3fb87ef8c2e7cf85'
AND (
token = 'oOObGwPGogrkgrG/zmLi2CbWxsSharNjysEelBmXbnw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)