UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '3pdRIe3RHeVCMgVWJdRJJxR+Pb3qUt3ZldvXsgIUZZA='
WHERE
key_id = '029aefa0536d9c5e4cc3a15d8d7765015a389ba41b89dc1e7c76f43893261b80'
AND (
token = '3pdRIe3RHeVCMgVWJdRJJxR+Pb3qUt3ZldvXsgIUZZA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)