UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8xecIuvqBaGEPa7hPJ9m+IDHITk7C4Rz6No2RWRWz8k='
WHERE
key_id = '374b1d06940811e50e10a2fc356381f6d8c3076a921d00c0053518c73931c37f'
AND (
token = '8xecIuvqBaGEPa7hPJ9m+IDHITk7C4Rz6No2RWRWz8k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)