UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '67zPgOgjJHrD5NzSEwDBg79YOFA5L1K7+1dBvcwR7+o='
WHERE
key_id = '62009d70cf84bb0111f03566e1be98ca682a3506030d778b6c7269961637c722'
AND (
token = '67zPgOgjJHrD5NzSEwDBg79YOFA5L1K7+1dBvcwR7+o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)