UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EDixYpOAYAQ/7c0Io29f+Z1kyDjf4t6Yert8xONVDGY=' 
WHERE 
  key_id = 'dbdb428830d1a54905d7fa644503cca1f852c50ef78325e8d2fef3879b40602a' 
  AND (
    token = 'EDixYpOAYAQ/7c0Io29f+Z1kyDjf4t6Yert8xONVDGY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028