UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4+Lxr/HEvwrsWAAzumcoG+UGcBP7UWXgfFp9OJIEebc='
WHERE
key_id = '8c960a1448542cdcbdc686417b87d7c502c2cad4a004fc95b0dd709a2f8ab415'
AND (
token = '4+Lxr/HEvwrsWAAzumcoG+UGcBP7UWXgfFp9OJIEebc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)