UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/U1i9AkhbBI3ddwTWHs9EW87h7OngpNmQ177eTSOnuk='
WHERE
key_id = '19f1723d884ef2b2cb34264d1e4238cd1396827c322155dae90ecb4aba80cf4f'
AND (
token = '/U1i9AkhbBI3ddwTWHs9EW87h7OngpNmQ177eTSOnuk='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)