UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'XtJEJKRJRWoLN/OCY3ky28ZJFKUvVAPtML5adqf+w7A=' 
WHERE 
  key_id = 'd9f4dd31dfb0ee6d4c6f634db84bf7e8bfb0bca70a60b61dd48be3ad2d3864bf' 
  AND (
    token = 'XtJEJKRJRWoLN/OCY3ky28ZJFKUvVAPtML5adqf+w7A=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00051