UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F/qH5TVsvxsPPS6+xULrOy+FqcQI9+xfQ3d8gOqlthY='
WHERE
key_id = '05ab46181474e0804790d06fa074f6f06d58ed303aed3cfd11fea3caf5d8eb53'
AND (
token = 'F/qH5TVsvxsPPS6+xULrOy+FqcQI9+xfQ3d8gOqlthY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)