UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'aVfvtT7QILZ07NUlNEvJ8Z6Jioif0ZulEOzN/YWRl5Q=' 
WHERE 
  key_id = '73d2e1c8ab056f6e34856807f24d92af1a2692ffa1106bf2b4b8cd5cd9d8b98d' 
  AND (
    token = 'aVfvtT7QILZ07NUlNEvJ8Z6Jioif0ZulEOzN/YWRl5Q=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031