UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+rutVAaifTidjSdJScDMHh1YE4vxZTvd0RG7AqkHCvI='
WHERE
key_id = '62099b646ff17e0b1bb82a190f22a09236ad5ac8c89c1374b0d97bbcc1236a25'
AND (
token = '+rutVAaifTidjSdJScDMHh1YE4vxZTvd0RG7AqkHCvI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)