UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xP40t/XEQc4g/vkaueZOILuJmSTdWLcyxoBgX1twnM8='
WHERE
key_id = '2b7392c022d9ca500766bb1d6af0b9e8e30fd1e6c92ed21ad5ab109a4f1883e0'
AND (
token = 'xP40t/XEQc4g/vkaueZOILuJmSTdWLcyxoBgX1twnM8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)