UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'm4r/LQtK1mBDzeTWqdlR3XFN9MgeNvi2nPGvVQjJjC8='
WHERE
key_id = '8269edd526a3c6b21b446c29fb9e597324c553771fff54dedd4fd5d1c27375c9'
AND (
token = 'm4r/LQtK1mBDzeTWqdlR3XFN9MgeNvi2nPGvVQjJjC8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)