UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SaTB4C5xFBNyEXZhbwRR0b+vGASokQHQ6gvKbH2+11w=' 
WHERE 
  key_id = '610a0abc5700b16d4b669f2e389dddcb47512bb536e9a92259df69b33521eea8' 
  AND (
    token = 'SaTB4C5xFBNyEXZhbwRR0b+vGASokQHQ6gvKbH2+11w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034