UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ar/2wc5Hv2hHe+zxtE/ZYJwBA+ExjkWi/s+wVtTylcM='
WHERE
key_id = '775e98a7d746f5e5fca5546fec0013ae3e4bbf02ac3f7df8de1d8821be8fa98a'
AND (
token = 'ar/2wc5Hv2hHe+zxtE/ZYJwBA+ExjkWi/s+wVtTylcM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)