UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'G3BoMy+PQ78y1YL8LzhnMVLiCkI3A7hJ5ekYuALcEk4='
WHERE
key_id = '446adc4d7ca09aee10cf5923edaa36a3dab1cfe728343344c7b5504ea0e61b4d'
AND (
token = 'G3BoMy+PQ78y1YL8LzhnMVLiCkI3A7hJ5ekYuALcEk4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)