UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Yywt5O1ZNXlk9gjBXGKzGLJy4+Kt2YovEjQyDhpjhZY='
WHERE
key_id = '2908a159f516b5b6f4deee3fabf92bffb0d37c1e65c38dbd7759e5048da9f660'
AND (
token = 'Yywt5O1ZNXlk9gjBXGKzGLJy4+Kt2YovEjQyDhpjhZY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)