UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'clmTwSIJTJ4FdxRj7pLShK4iI13I//1l2RdJ2L5FKbE='
WHERE
key_id = '815907ee30fefad0c79b90b8d7b9aeb63544a4903005908d3a4ab9ab4c0eab31'
AND (
token = 'clmTwSIJTJ4FdxRj7pLShK4iI13I//1l2RdJ2L5FKbE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)