UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'yBkj/UyoirRflXss1y/HGqy+X83zh8cyqEiFw5fvyxM='
WHERE
key_id = '26fceafddedb04639bed4bdfc2ed8eaf35c4bda9eda7599e6db0c7e15bba6d50'
AND (
token = 'yBkj/UyoirRflXss1y/HGqy+X83zh8cyqEiFw5fvyxM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)