UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '5qHukaKBVCrbRhQMYTUnYKp1L3g90gR/ZvJlGwsGhZQ='
WHERE
key_id = '3bb911f57e1bda60c7d86dedce474adc926685998867cd11c592cb8dce58a56b'
AND (
token = '5qHukaKBVCrbRhQMYTUnYKp1L3g90gR/ZvJlGwsGhZQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)