UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'HVfxLKN0nZ/TEpBYqEn0ihMrl2ydq65FSywHETO31Iw='
WHERE
key_id = '6cb4c5f73ffd5ae92ff17b536a1444fb502c1b9d23c17267b6e8fe04580290e9'
AND (
token = 'HVfxLKN0nZ/TEpBYqEn0ihMrl2ydq65FSywHETO31Iw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)