UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DsZwzO/0eTHGMvts8hU7K9u8W0iMhAyC4A6r6Zx5IKM='
WHERE
key_id = 'cf54ea7f6c775831d1529ab6eb7cdf3fd5b91b070c836123de6ce9c3f606d7f6'
AND (
token = 'DsZwzO/0eTHGMvts8hU7K9u8W0iMhAyC4A6r6Zx5IKM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)