UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'B7SqsipjOLQC3ObzEwOzx47ZLkAz2n4LgmQ/RxFVGRs='
WHERE
key_id = '60b929d59a301256bd17fdcc7b9484f1176b3c41bcdba8922632c5c2967502aa'
AND (
token = 'B7SqsipjOLQC3ObzEwOzx47ZLkAz2n4LgmQ/RxFVGRs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)