UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'xPo6dYW6fsVbE3hWGVvqmO260uQtWgV7ZHL1f45o6Ko=' 
WHERE 
  key_id = '10ec8644f98a2de546b1f726fdc7ec3970eccfdc1fb7c641e6cdaee1999a04b2' 
  AND (
    token = 'xPo6dYW6fsVbE3hWGVvqmO260uQtWgV7ZHL1f45o6Ko=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00030