UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+uxVGTvBIZ/sAnLllw8fhH3H7AV72YerUVgk3CTpfL0='
WHERE
key_id = 'a08f4994f1d2301c7005f2bd70194a9b0622a279dee8a4d47e54f5d5387013e5'
AND (
token = '+uxVGTvBIZ/sAnLllw8fhH3H7AV72YerUVgk3CTpfL0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)