UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zkt2NnZNHwcqWLSFDzYtv1NfDKq1CvZQDKYJZEWwbyc='
WHERE
key_id = '76063b49c2d8cc3dd491df8905fba0ad666262a13cd5267e2ab05faf526431ee'
AND (
token = 'zkt2NnZNHwcqWLSFDzYtv1NfDKq1CvZQDKYJZEWwbyc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)