UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'neLUbCNsF/+wMJDXnvbifjfiVQF+vM5cSf8H6Su8L/E=' 
WHERE 
  key_id = 'c79a4cedd560d67d8efe141a7f365b9ab242f1daf0f4b21c86f66d7f9e8dde37' 
  AND (
    token = 'neLUbCNsF/+wMJDXnvbifjfiVQF+vM5cSf8H6Su8L/E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00043