UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'XYNf7g9L2zG+IXLl8Z/TNVg5Hd+8VCJY4jzH6TR5lxU='
WHERE
key_id = 'f1b7a7d0dbf4fa4ed2521361a84229eca8df7f18a69328f26910d9e66646c70f'
AND (
token = 'XYNf7g9L2zG+IXLl8Z/TNVg5Hd+8VCJY4jzH6TR5lxU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)