UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'h21ZV+IhvAaN9KLdkHvY84C9j8cktd/ZnI8CgHCQt9o='
WHERE
key_id = '87775810f992121ed21a04b87ae1ca00628b6b7bd926435a4aa0fffce4d406b1'
AND (
token = 'h21ZV+IhvAaN9KLdkHvY84C9j8cktd/ZnI8CgHCQt9o='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)