UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Sil/u+63Tf4pR6fp2qAVqioXQ7P+nLDeacboKp0EHwI='
WHERE
key_id = 'a132164955676afa7ccfe4da0a0e08e070297a9c8b9c9c4a1a746bfc8b43c587'
AND (
token = 'Sil/u+63Tf4pR6fp2qAVqioXQ7P+nLDeacboKp0EHwI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)